using System.Threading;
using System.Threading.Tasks;

using DDD.Domain.Events;

using MediatR;

namespace DDD.Domain.EventHandlers;

public class CustomerEventHandler :
    INotificationHandler<CustomerRegisteredEvent>,
    INotificationHandler<CustomerUpdatedEvent>,
    INotificationHandler<CustomerRemovedEvent>
{
    public Task Handle(CustomerUpdatedEvent message, CancellationToken cancellationToken)
    {
        // Send some notification e-mail

        return Task.CompletedTask;
    }

    public Task Handle(CustomerRegisteredEvent message, CancellationToken cancellationToken)
    {
        // Send some greetings e-mail

        return Task.CompletedTask;
    }

    public Task Handle(CustomerRemovedEvent message, CancellationToken cancellationToken)
    {
        // Send some see you soon e-mail

        return Task.CompletedTask;
    }
}
